<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<script type="text/javascript">
	$('#addOrderFormBtn').linkbutton({   
	    iconCls: 'icon-add'  
	});  
	$('#delOrderFormBtn').linkbutton({   
	    iconCls: 'icon-remove'  
	}); 
	$('#addOrderFormBtn').bind('click', function(){   
 		 var tr =  $("#add_orderForm_table_template tr").clone();
	 	 $("#add_orderForm_table").append(tr);
	 	 resetTrNum('add_orderForm_table');
	 	 return false;
    });  
	$('#delOrderFormBtn').bind('click', function(){   
      	$("#add_orderForm_table").find("input:checked").parent().parent().remove();   
        resetTrNum('add_orderForm_table'); 
        return false;
    }); 
    $(document).ready(function(){
    	$(".datagrid-toolbar").parent().css("width","auto");
    	if(location.href.indexOf("load=detail")!=-1){
			$(":input").attr("disabled","true");
			$(".datagrid-toolbar").hide();
		}
		//将表格的表头固定
	    $("#orderForm_table").createhftable({
	    	height:'300px',
			width:'auto',
			fixFooter:false
			});
    });
</script>
<div style="padding: 3px; height: 25px;width:auto;" class="datagrid-toolbar">
	<a id="addOrderFormBtn" href="#">添加</a> <a id="delOrderFormBtn" href="#">删除</a> 
</div>
<table border="0" cellpadding="2" cellspacing="0" id="orderForm_table">
	<tr bgcolor="#E6E6E6">
		<td align="center" bgcolor="#EEEEEE">序号</td>
		<td align="center" bgcolor="#EEEEEE">操作</td>
				  <td align="left" bgcolor="#EEEEEE">
						操作人ID
				  </td>
				  <td align="left" bgcolor="#EEEEEE">
						操作人名称
				  </td>
				  <td align="left" bgcolor="#EEEEEE">
						操作时间
				  </td>
				  <td align="left" bgcolor="#EEEEEE">
						规格或尺寸
				  </td>
				  <td align="left" bgcolor="#EEEEEE">
						订单审核是否通过
				  </td>
				  <td align="left" bgcolor="#EEEEEE">
						生产编号
				  </td>
				  <td align="left" bgcolor="#EEEEEE">
						实际进行
				  </td>
				  <td align="left" bgcolor="#EEEEEE">
						生产是否完成
				  </td>
				  <td align="left" bgcolor="#EEEEEE">
						是否需要上门安装
				  </td>
				  <td align="left" bgcolor="#EEEEEE">
						门市确认收货
				  </td>
				  <td align="left" bgcolor="#EEEEEE">
						发货
				  </td>
				  <td align="left" bgcolor="#EEEEEE">
						客户确认收货
				  </td>
				  <td align="left" bgcolor="#EEEEEE">
						尾款
				  </td>
				  <td align="left" bgcolor="#EEEEEE">
						定金
				  </td>
				  <td align="left" bgcolor="#EEEEEE">
						是否为代收款
				  </td>
				  <td align="left" bgcolor="#EEEEEE">
						付款方式
				  </td>
				  <td align="left" bgcolor="#EEEEEE">
						是否继续下一环节
				  </td>
				  <td align="left" bgcolor="#EEEEEE">
						备注
				  </td>
	</tr>
	<tbody id="add_orderForm_table">	
	<c:if test="${fn:length(orderFormList)  <= 0 }">
			<tr>
				<td align="center"><div style="width: 25px;" name="xh">1</div></td>
				<td align="center"><input style="width:20px;"  type="checkbox" name="ck"/></td>
					<input name="orderFormList[0].id" type="hidden"/>
					<input name="orderFormList[0].orderProcessId" type="hidden"/>
				  <td align="left">
					  	<input name="orderFormList[0].operateId" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					               >
					  <label class="Validform_label" style="display: none;">操作人ID</label>
					</td>
				  <td align="left">
					  	<input name="orderFormList[0].operateName" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					               >
					  <label class="Validform_label" style="display: none;">操作人名称</label>
					</td>
				  <td align="left">
					  	<input name="orderFormList[0].operateTime" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					               >
					  <label class="Validform_label" style="display: none;">操作时间</label>
					</td>
				  <td align="left">
					  	<input name="orderFormList[0].specification" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					               >
					  <label class="Validform_label" style="display: none;">规格或尺寸</label>
					</td>
				  <td align="left">
					  	<input name="orderFormList[0].approval" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					               >
					  <label class="Validform_label" style="display: none;">订单审核是否通过</label>
					</td>
				  <td align="left">
					  	<input name="orderFormList[0].productionNumber" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					               >
					  <label class="Validform_label" style="display: none;">生产编号</label>
					</td>
				  <td align="left">
					  	<input name="orderFormList[0].actualProgress" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					               >
					  <label class="Validform_label" style="display: none;">实际进行</label>
					</td>
				  <td align="left">
					  	<input name="orderFormList[0].isFinish" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					               >
					  <label class="Validform_label" style="display: none;">生产是否完成</label>
					</td>
				  <td align="left">
					  	<input name="orderFormList[0].isInstall" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					               >
					  <label class="Validform_label" style="display: none;">是否需要上门安装</label>
					</td>
				  <td align="left">
					  	<input name="orderFormList[0].receiving" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					               >
					  <label class="Validform_label" style="display: none;">门市确认收货</label>
					</td>
				  <td align="left">
					  	<input name="orderFormList[0].deliverGoods" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					               >
					  <label class="Validform_label" style="display: none;">发货</label>
					</td>
				  <td align="left">
					  	<input name="orderFormList[0].customerReceiving" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					               >
					  <label class="Validform_label" style="display: none;">客户确认收货</label>
					</td>
				  <td align="left">
					  	<input name="orderFormList[0].paymentDeadline" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					               >
					  <label class="Validform_label" style="display: none;">尾款</label>
					</td>
				  <td align="left">
					  	<input name="orderFormList[0].paymentStart" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					               >
					  <label class="Validform_label" style="display: none;">定金</label>
					</td>
				  <td align="left">
					  	<input name="orderFormList[0].isDelegation" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					               >
					  <label class="Validform_label" style="display: none;">是否为代收款</label>
					</td>
				  <td align="left">
					  	<input name="orderFormList[0].paymentMethods" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					               >
					  <label class="Validform_label" style="display: none;">付款方式</label>
					</td>
				  <td align="left">
					  	<input name="orderFormList[0].isContinue" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					               >
					  <label class="Validform_label" style="display: none;">是否继续下一环节</label>
					</td>
				  <td align="left">
					  	<input name="orderFormList[0].remark" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					               >
					  <label class="Validform_label" style="display: none;">备注</label>
					</td>
   			</tr>
	</c:if>
	<c:if test="${fn:length(orderFormList)  > 0 }">
		<c:forEach items="${orderFormList}" var="poVal" varStatus="stuts">
			<tr>
				<td align="center"><div style="width: 25px;" name="xh">${stuts.index+1 }</div></td>
				<td align="center"><input style="width:20px;"  type="checkbox" name="ck" /></td>
					<input name="orderFormList[${stuts.index }].id" type="hidden" value="${poVal.id }"/>
					<input name="orderFormList[${stuts.index }].orderProcessId" type="hidden" value="${poVal.orderProcessId }"/>
				   <td align="left">
					  	<input name="orderFormList[${stuts.index }].operateId" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					                value="${poVal.operateId }">
					  <label class="Validform_label" style="display: none;">操作人ID</label>
				   </td>
				   <td align="left">
					  	<input name="orderFormList[${stuts.index }].operateName" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					                value="${poVal.operateName }">
					  <label class="Validform_label" style="display: none;">操作人名称</label>
				   </td>
				   <td align="left">
					  	<input name="orderFormList[${stuts.index }].operateTime" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					                value="${poVal.operateTime }">
					  <label class="Validform_label" style="display: none;">操作时间</label>
				   </td>
				   <td align="left">
					  	<input name="orderFormList[${stuts.index }].specification" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					                value="${poVal.specification }">
					  <label class="Validform_label" style="display: none;">规格或尺寸</label>
				   </td>
				   <td align="left">
					  	<input name="orderFormList[${stuts.index }].approval" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					                value="${poVal.approval }">
					  <label class="Validform_label" style="display: none;">订单审核是否通过</label>
				   </td>
				   <td align="left">
					  	<input name="orderFormList[${stuts.index }].productionNumber" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					                value="${poVal.productionNumber }">
					  <label class="Validform_label" style="display: none;">生产编号</label>
				   </td>
				   <td align="left">
					  	<input name="orderFormList[${stuts.index }].actualProgress" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					                value="${poVal.actualProgress }">
					  <label class="Validform_label" style="display: none;">实际进行</label>
				   </td>
				   <td align="left">
					  	<input name="orderFormList[${stuts.index }].isFinish" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					                value="${poVal.isFinish }">
					  <label class="Validform_label" style="display: none;">生产是否完成</label>
				   </td>
				   <td align="left">
					  	<input name="orderFormList[${stuts.index }].isInstall" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					                value="${poVal.isInstall }">
					  <label class="Validform_label" style="display: none;">是否需要上门安装</label>
				   </td>
				   <td align="left">
					  	<input name="orderFormList[${stuts.index }].receiving" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					                value="${poVal.receiving }">
					  <label class="Validform_label" style="display: none;">门市确认收货</label>
				   </td>
				   <td align="left">
					  	<input name="orderFormList[${stuts.index }].deliverGoods" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					                value="${poVal.deliverGoods }">
					  <label class="Validform_label" style="display: none;">发货</label>
				   </td>
				   <td align="left">
					  	<input name="orderFormList[${stuts.index }].customerReceiving" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					                value="${poVal.customerReceiving }">
					  <label class="Validform_label" style="display: none;">客户确认收货</label>
				   </td>
				   <td align="left">
					  	<input name="orderFormList[${stuts.index }].paymentDeadline" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					                value="${poVal.paymentDeadline }">
					  <label class="Validform_label" style="display: none;">尾款</label>
				   </td>
				   <td align="left">
					  	<input name="orderFormList[${stuts.index }].paymentStart" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					                value="${poVal.paymentStart }">
					  <label class="Validform_label" style="display: none;">定金</label>
				   </td>
				   <td align="left">
					  	<input name="orderFormList[${stuts.index }].isDelegation" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					                value="${poVal.isDelegation }">
					  <label class="Validform_label" style="display: none;">是否为代收款</label>
				   </td>
				   <td align="left">
					  	<input name="orderFormList[${stuts.index }].paymentMethods" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					                value="${poVal.paymentMethods }">
					  <label class="Validform_label" style="display: none;">付款方式</label>
				   </td>
				   <td align="left">
					  	<input name="orderFormList[${stuts.index }].isContinue" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					                value="${poVal.isContinue }">
					  <label class="Validform_label" style="display: none;">是否继续下一环节</label>
				   </td>
				   <td align="left">
					  	<input name="orderFormList[${stuts.index }].remark" maxlength="45" 
					  		type="text" class="inputxt"  style="width:120px;"
					               
					                value="${poVal.remark }">
					  <label class="Validform_label" style="display: none;">备注</label>
				   </td>
   			</tr>
		</c:forEach>
	</c:if>	
	</tbody>
</table>
